package com.zhuyuan.auth.service;

import com.zhuyuan.core.exception.CaptchaException;
import com.zhuyuan.core.util.Result;

import java.util.Map;

/**
 * @Author: 张琳凯
 * @Description: TODO
 * @DateTime: 2025/2/19 10:40
 **/
public interface CaptchaService {

    /**
     * 获取验证码
     *
     * @return Result
     */
    Result<?> getCaptchaCode();

    /**
     * 获取短信验证码
     *
     * @param mobile 手机号码
     * @return Result
     */
    Result<?> getSmsCode(String mobile);

    /**
     * 校验验证码
     *
     * @param key  　KEY
     * @param code 验证码
     * @throws CaptchaException 验证码异常
     */
    void check(String key, String code) throws CaptchaException;
}
